{% extends 'web_template/default_two/templates/base.html' %}
{% block title %}
    搜索 {{ tlcms_search.search }} 结果页面
{% endblock %}
{% block content %}

    <div class="weizhi">系统搜索到约有<strong>{{ tlcms_search.dataList|length }}</strong>项符合<strong>{{ tlcms_search.search }}</strong>的查询结果</div>
    <ul class="news_list">
        {% for foo in tlcms_search.dataList %}
            <li><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" title="{{ foo.title }}" target="_blank"><i><img src="{{ foo.imgUrl }}" alt="{{ foo.title }}"></i>
                <h2>{{ foo.title }}</h2>
            </a>
                <p class="news_list_info">{{ foo.description[:60] }}{% if foo.description|length>60 %}...{% endif %}</p>
                <p class="news_list_time"><span><a href="{{ url_for('webapp_bp.list_article_page',cid=foo.PID_ID) }}"
                                                   target="_blank">{{ foo.PID }}</a></span><span>时间：{{ foo.update_time }}</span><span>点击：{{ foo.clicks }}</span></p>
            </li>
        {% endfor %}
    </ul>
    {% if tlcms_search.page.pages>1 %}
        <div class="pagelist">
            {% if tlcms_search.page.prev %}
                <a href="{{ url_for('webapp_bp.search') }}?page=1&keywords={{ tlcms_search.search }}">‹‹</a>
                <a href="{{ url_for('webapp_bp.search') }}?page={{ tlcms_search.page.prevPage }}&keywords={{ tlcms_search.search }}" class="next">‹</a>
            {% endif %}
            {% for foo in tlcms_search.page.iter_pages %}
                {% if tlcms_search.page.currentPage==foo %}
                    <a href="javascript:;">{{ foo }}</a>
                {% else %}
                    <a href="{{ url_for('webapp_bp.search') }}?page={{ foo }}&keywords={{ tlcms_search.search }}">{{ foo }}</a>
                {% endif %}
            {% endfor %}
            {% if tlcms_search.page.next %}
                <a href="{{ url_for('webapp_bp.search') }}?page={{ tlcms_search.page.nextPage }}&keywords={{ tlcms_search.search }}" class="next">›</a>
            {% endif %}
            {% if tlcms_search.page.pages!=tlcms_search.page.currentPage %}
                <a href="{{ url_for('webapp_bp.search') }}?page={{ tlcms_search.page.pages }}&keywords={{ tlcms_search.search }}">››</a>
            {% endif %}
        </div>
    {% endif %}
{% endblock %}